package cn.sxt.logistics.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDate;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author ${author}
 * @since 2020-06-13
 */
@TableName("t_admin")
@Data
public class Admin implements Serializable {

    private static final long serialVersionUID=1L;

      @TableId(value = "admin_id", type = IdType.AUTO)
      private Long adminId;

    private String username;


    private String realname;

    @JsonIgnore
    private String password;
    @JsonIgnore
    private String salt;

    private Integer status;


    private LocalDate createDate;

    private Long roleId;

    @TableField(select = false)
    private Role role;

    @TableField(select = false)
    private String rolename;

    
    public Long getAdminId() {
        return adminId;
    }

      public void setAdminId(Long adminId) {
          this.adminId = adminId;
      }
    
    public String getUsername() {
        return username;
    }

      public void setUsername(String username) {
          this.username = username;
      }
    
    public String getRealname() {
        return realname;
    }

      public void setRealname(String realname) {
          this.realname = realname;
      }
    
    public String getPassword() {
        return password;
    }

      public void setPassword(String password) {
          this.password = password;
      }
    
    public String getSalt() {
        return salt;
    }

      public void setSalt(String salt) {
          this.salt = salt;
      }
    
    public Integer getStatus() {
        return status;
    }

      public void setStatus(Integer status) {
          this.status = status;
      }
    
    public LocalDate getCreateDate() {
        return createDate;
    }

      public void setCreateDate(LocalDate createDate) {
          this.createDate = createDate;
      }
    
    public Long getRoleId() {
        return roleId;
    }

      public void setRoleId(Long roleId) {
          this.roleId = roleId;
      }

    @Override
    public String toString() {
        return "Admin{" +
              "adminId=" + adminId +
                  ", username=" + username +
                  ", realname=" + realname +
                  ", password=" + password +
                  ", salt=" + salt +
                  ", status=" + status +
                  ", createDate=" + createDate +
                  ", roleId=" + roleId +
              "}";
    }
}
